<template>
  <div>
    <van-nav-bar title="我的优惠券" @click-left="onClickLeft" left-arrow />
    <div class="main">
      <div class="yhq" v-for="item in 2" :key="item">
        <div class="yhq-box">
          <div class="coin">
            <span>¥</span>
            <span class="je">10</span>
          </div>
          <div class="text">
            <p>10元专享立减劵</p>
            <span>有效期至2020.08.06</span>
          </div>
          <button>立即使用</button>
        </div>
        <div class="yhq-text">
          <span>赠送新注册用户</span>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  methods: {
    onClickLeft() {
      this.$router.back();
    },
  },
};
</script>

<style lang="scss" scoped>
.van-nav-bar {
  height: 54px;
  line-height: 54px;
  .van-icon {
    color: #333333;
  }
}
.main {
  height: 642px;
  background: #f2f2f2;
  padding-top: 20px;
  .yhq {
    width: 326px;
    height: 120px;
    padding: 0 10px;
    margin: 0 auto;
    margin-bottom: 20px;
    background-color: white;
    box-shadow: 2px 2px 3px 3px rgb(231, 231, 231);
    .yhq-box {
      width: 336px;
      height: 90px;
      display: flex;
      text-align: center;
      align-items: center;
      justify-content: space-around;
      .coin {
        color: rgba(102, 110, 232, 1);
        .je {
          font-size: 40px;
          font-weight: 500;
        }
      }
      .text {
        width: 180px;
        p {
          margin: 0 0;
          font-size: 15px;
        }
        span {
          font-size: 12px;
          color: #cccccc;
        }
      }

      button {
        width: 75px;
        height: 26px;
        color: white;
        font-size: 12px;
        border: none;
        border-radius: 50px;
        background-color: rgba(102, 110, 232, 1);
      }
    }
    .yhq-text {
      font-size: 12px;
      color: #cccccc;
    }
  }
}
</style>